package com.example.springbootdemo.logoController;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Description:
 * User: 故我
 * Date: 2023-10-30
 * Time: 8:57
 */
@Controller
@RequestMapping("/user")
@ResponseBody  //表示该类所有的方法返回的是数据非页面
public class UserController {
    private Logger logger = LoggerFactory.getLogger(UserController.class);
    @RequestMapping("/hi")
    public void Test(){
        logger.trace("hi,trace!");
        logger.debug("hi,debug!");
        logger.info("hi,info!");//从这个日志等级开始打印
        logger.warn("hi,warn!");
        logger.error("hi,error!");
    }

}
